if(window.location.href.indexOf("cms.com") != -1){
	document.domain = "cms.com";
}
var website_url= 'http://www.cms.com/';
var CKDomain = ".cms.com";
var CKPath = "/";
var CKPrex = "";
function set_cookie(n, v, d) {
	var e = ''; 
	var f = d ? d : 365;
	e = new Date((new Date()).getTime() + f * 86400000);
	e = "; expires=" + e.toGMTString();
	document.cookie = CKPrex + n + "=" + v + ((CKPath == "") ? "" : ("; path=" + CKPath)) + ((CKDomain =="") ? "" : ("; domain=" + CKDomain)) + e; 
}
function get_cookie(n) {
	var v = ''; var s = CKPrex + n + "=";
	if(document.cookie.length > 0) {
		o = document.cookie.indexOf(s);
		if(o != -1) {	
			o += s.length;
			end = document.cookie.indexOf(";", o);
			if(end == -1) end = document.cookie.length;
			v = unescape(document.cookie.substring(o, end));
		}
	}
	return v;
}
function del_cookie(n) {
	var e = new Date((new Date()).getTime() - 1 ); e = "; expires=" + e.toGMTString(); 
	document.cookie = CKPrex + n + "=" + escape("") +";path=/"+ e;
}
function login_check() {
    for (var i = 0; i < document.form_login.elements.length - 1; i++) {
        if (document.form_login.elements[i].value == "") {
            alert("请将用户名、密码填写完之后再提交！谢谢~");
            document.form_login.elements[i].focus();
            return false
        }
    }
    return true
}